﻿$ErrorActionPreference = "Stop"

$null = Write-Host "运行脚本前请确定安装好chrome浏览器"

try {
    $PythonVersion = python.exe --version
} catch {
    $null = Read-Host "请安装一个Python3环境"
}

if($PythonVersion -match "Python 3\.[0-9.]+"){
    pip.exe install -r requirements.txt
    $null = Read-Host "安装完成,输入回车关闭脚本"
} else {
    $null = Read-Host "请安装python3环境"
}